﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Inspinia_MVC5.Models
{
    /// <summary>
    /// 学生表
    /// </summary>
    public class Student
    {
        public int ID { get; set; }

        [StringLength(50)]
        [Display(Name = "姓名")]
        [Required]


        public string StuName { get; set; }

        [Display(Name = "班级")]
        [Required]


        public int? ClassId { get; set; }

        [StringLength(50)]
        [Display(Name = "邮箱")]
        [Required]


        public string StuNum { get; set; }

        [StringLength(50)]
        [Display(Name = "身份证号")]
        [Required]


        public string StuIdCard { get; set; }

        [StringLength(50)]
        [Display(Name = "手机")]
        [Required]


        public string StuPhone { get; set; }

        [StringLength(50)]
        [Display(Name = "密码")]
        [Required]


        public string StuPwd { get; set; }

        [Display(Name = "状态")]

        public int? Status { get; set; }
        public string Photo { get; set; }


        //[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual ICollection<Borrow> Borrow { get; set; }

        public virtual Class Class { get; set; }
    }
}